package com.sc.nft.entity.vo;

import cn.hutool.core.convert.Convert;
import com.sc.nft.enums.MallIncomeTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class MallIncomeVO {

    @ApiModelProperty(value = "唯一标识id")
    private Long id;

    @ApiModelProperty(value = "品牌id")
    private Long daoId;

    @ApiModelProperty(value = "藏品id")
    private Long collectionId;

    @ApiModelProperty(value = "收益名称")
    private String incomeName;

    @ApiModelProperty(value = "收益分类 DIRECT_PUSH:直推收益 INDIRECT_PUSH:间推收益 URBAN_SERVICE_CENTER:城市服务中心收益")
    private MallIncomeTypeEnum incomeType;

    @ApiModelProperty(value = "收益比例")
    private BigDecimal incomeProportion;

    @ApiModelProperty(value = "藏品名字")
    private String firstTitle;

    public void setIncomeProportion(BigDecimal incomeProportion) {
        this.incomeProportion = incomeProportion.multiply(Convert.toBigDecimal(100));
    }

}
